package com.ruoyi.dynamic;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.system.mapper.SysUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author alison
 * @Date 2024/12/15 11:49
 * @Version 1.0
 * @Description
 */
@DataSource(value = DataSourceType.SLAVE)
@Service
public class DsUserService {


    @Autowired
    private SysUserMapper userMapper;

    public void query() {
        SysUser user = userMapper.selectUserByLoginName("sched");
        assert user == null;
    }
}
